package com.cowealth.platform.common.base.vo.request;

import java.io.Serializable;
import java.util.Collection;

/**
 * 分页查询请求对象
 *
 * @author : skycdm
 * @version : 1.0.0
 * @date : 2020/5/27 15:05
 */
public class PageRequest<T> implements Serializable {

    /**
     * 请求参数
     */
    private T param;

    /**
     * 每页大小
     */
    private Integer pageSize;

    /**
     * 当前页码
     */
    private Integer currentPage;

    /**
     * 排序参数
     */
    private Collection<SortRequest> sortingFields;


    public T getParam() {
        return param;
    }

    public PageRequest<T> setParam(T param) {
        this.param = param;
        return this;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public PageRequest<T> setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public PageRequest<T> setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
        return this;
    }

    public Collection<SortRequest> getSortingFields() {
        return sortingFields;
    }

    public PageRequest<T> setSortingFields(Collection<SortRequest> sortingFields) {
        this.sortingFields = sortingFields;
        return this;
    }
}
